using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class periochMap : EntityTypeConfiguration<perioch>
    {
        public periochMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.note)
                .IsFixedLength()
                .HasMaxLength(60);

            // Table & Column Mappings
            this.ToTable("perioch");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.pat_id).HasColumnName("pat_id");
            this.Property(t => t.plan_nb).HasColumnName("plan_nb");
            this.Property(t => t.toothno).HasColumnName("toothno");
            this.Property(t => t.genl).HasColumnName("genl");
            this.Property(t => t.genm).HasColumnName("genm");
            this.Property(t => t.genr).HasColumnName("genr");
            this.Property(t => t.pocl).HasColumnName("pocl");
            this.Property(t => t.pocm).HasColumnName("pocm");
            this.Property(t => t.pocr).HasColumnName("pocr");
            this.Property(t => t.furc1).HasColumnName("furc1");
            this.Property(t => t.furc2).HasColumnName("furc2");
            this.Property(t => t.furc3).HasColumnName("furc3");
            this.Property(t => t.abcess1).HasColumnName("abcess1");
            this.Property(t => t.abcess2).HasColumnName("abcess2");
            this.Property(t => t.attached).HasColumnName("attached");
            this.Property(t => t.mobility).HasColumnName("mobility");
            this.Property(t => t.drift1).HasColumnName("drift1");
            this.Property(t => t.open1).HasColumnName("open1");
            this.Property(t => t.food).HasColumnName("food");
            this.Property(t => t.egrup).HasColumnName("egrup");
            this.Property(t => t.note).HasColumnName("note");
            this.Property(t => t.frein).HasColumnName("frein");
            this.Property(t => t.forward).HasColumnName("forward");
        }
    }
}
